<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>原生js操作</title>
</head>
<body>
  <p></p>
  <p></p>
  <p></p>
  <script>
    let msg = 'atguigu';
    const pNodeLists = document.querySelectorAll('p');
    for(let i = 0; i < pNodeLists.length; i++){
      pNodeLists[i].innerHTML = msg;
    }
  </script>
</body>
</html>